package ru.vboxdc.domain;

import ru.vboxdc.iface.VirtualMachineManager;

/**
 * User: lelon
 * Date: 10.02.2009
 * Time: 16:00:45
 */
public class VirtualMachine implements Comparable {

    private Integer id;
    private HostServer hostServer;
    private VirtualMachineManager manager;
    private String name;

    @Override
    public String toString() {
        return name;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setHostServer(HostServer hostServer) {
        this.hostServer = hostServer;
    }

    public HostServer getHostServer() {
        return hostServer;
    }

    public void setManager(VirtualMachineManager virtualMachineManager) {
        manager=virtualMachineManager;
    }

    public VirtualMachineManager getManager() {
        return manager;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public int compareTo(Object o) {
        return name.compareTo(o.toString());
    }
}
